import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import common from './modules/common'
import tags from './modules/tags'
import logs from './modules/logs'
import getters from './getters'
import MiniAccident from "./modules/MiniAccident";
import AccidentInfo from "./modules/AccidentInfo";
import HousingInfo from "./modules/HousingInfo";

//1 安装插件
Vue.use(Vuex)
//2 创建对象
const store = new Vuex.Store({
  modules: {
    user,
    common,
    MiniAccident,
    AccidentInfo,
    HousingInfo,
    logs,
    tags
  },
  getters,
})
//3 导出store
export default store


// 可以参考第138集视频，将mutations写成常量，可以避免错误
